package pacBiopackage;


import tools.kmer.KmerSet_binary;

public class ObjectToKmerHash_TestFile 
{
	public static void main(String[] args) 
	{
		GetOpt go = new GetOpt(args,"i:o:h");
		go.optErr = true;
		int ch = -1;
		
		// process options in command line arguments
		// Set default values
		boolean usagePrint = false;                 
		String filenameOutput="output.txt";
		String filenameKmersObject ="";
		while ((ch = go.getopt()) != GetOpt.optEOF) 
		{
		    if ((char)ch == 'h') {
		       usagePrint = true;
		   }
		   else if((char)ch =='o')
		   {
			  filenameOutput = go.optArgGet();
		   }
		   else if((char)ch =='i')
		   {
			   filenameKmersObject=go.optArgGet();
		   }
		   else
		       System.exit(1);                     // undefined option
		}                                           // getopt() returns '?'
		
		if (usagePrint || filenameKmersObject.isEmpty()) {
		    System.out.println("Usage: -i Kmers [ -o outputFile -h]"); //NOI18N
		    System.exit(0);
		}
		
		// @TODO check if files exist
	
		System.out.println("------------------------");
		System.out.println("Command line parameter settings:");
		System.out.println("-i " + filenameKmersObject); //NOI18N
		System.out.println("-o " + filenameOutput); //NOI18N
		System.out.println("------------------------");
		
		
		// zu messender Code
		
		
		KmerSet_binary ks= null;// new KmerSet_binary(kmersSize);
		System.out.print("reading hash");
		ObjectSerializing<KmerSet_binary> ks_obect = new ObjectSerializing<KmerSet_binary>();
		long start = System.currentTimeMillis();
		ks_obect.deserializeObject(ks, filenameKmersObject);
		
		System.out.println("Duration in ms: " + (System.currentTimeMillis() - start));
		System.out.print("done");
		

		
		
		
	}
}
